package org.abratuhi.kvngroupware.pubsub;

public class Value {
	public static Value MIN = new Value(Integer.MIN_VALUE);
	public static Value MAX = new Value(Integer.MAX_VALUE);
	
	Integer value;
	
	public Value(Integer v){
		value = v;
	}
	public int compareTo(Value value){
		if(value.value > this.value) return -1;
		else if(value.value == this.value) return 0;
		else return 1;
	}
	public Value midTo(Value value){
		return new Value((this.value+value.value)/2);
	}
	public String toString(){
		return value.toString();
	}

}
